package Mangos::DB::Realmd::IpBanned;

use strict;

use base qw(Mangos::DB::Realmd);

__PACKAGE__->meta->setup
(
    table   => 'ip_banned',

    columns => 
    [
        ip        => { type => 'varchar', length => 32, not_null => 1 },
        bandate   => { type => 'bigint', not_null => 1 },
        unbandate => { type => 'bigint', not_null => 1 },
        bannedby  => { type => 'varchar', default => '[Console]', length => 50, not_null => 1 },
        banreason => { type => 'varchar', default => 'no reason', length => 255, not_null => 1 },
    ],

    primary_key_columns => [ 'ip', 'bandate' ],
);

1;

package Mangos::DB::Realmd::IpBanned::Manager;

use strict;
use warnings;

use base 'Rose::DB::Object::Manager';

sub object_class { 'Mangos::DB::Realmd::IpBanned' }

__PACKAGE__->make_manager_methods('ip_banned');

1;
